/* ------------------------------
   VARIÁVEIS
--------------------------------*/
:root{
  --bg-page:#f5f7fb;
  --bg-card:#ffffff;
  --border-card:#e2e8f0;
  --shadow-card:0 18px 45px rgba(15,23,42,.08);
  --primary:#2563eb;
  --text-main:#0f172a;
  --text-muted:#6b7280;
  --radius-card:18px;
  --radius-field:12px;
}

/* ------------------------------
   BASE
--------------------------------*/
*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

body{
  font-family:"Inter",sans-serif;
  background:var(--bg-page);
  color:var(--text-main);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("img/contas.png") center/80% no-repeat;
  opacity: 0.40;
  pointer-events: none;
  z-index: -1;
}

a{
  text-decoration:none;
  color:inherit;
}

.wrap{
  max-width:1120px;
  margin:0 auto;
  padding:32px 20px 56px;
}

/* ------------------------------
   HEADER
--------------------------------*/
.site-header{
  background:#0b1120;
  color:#e5e7eb;
  box-shadow:0 10px 30px rgba(15,23,42,.45);
  position:sticky;
  top:0;
  z-index:20;
}

.header-row{
  max-width:1120px;
  margin:0 auto;
  padding:14px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
}

.brand-mark{
  width:34px;
  height:34px;
  border-radius:999px;
  background:linear-gradient(135deg,#22c55e,#16a34a);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:1.1rem;
  color:#f9fafb;
}

.brand-text strong{
  display:block;
  font-size:.95rem;
}

.brand-text .muted{
  display:block;
  font-size:.72rem;
  color:#9ca3af;
}

.nav-links{
  list-style:none;
  display:flex;
  gap:14px;
  align-items:center;
  font-size:.86rem;
}

.nav-links a{
  padding:7px 11px;
  border-radius:999px;
  display:flex;
  align-items:center;
  gap:6px;
  color:#e5e7eb;
}

.nav-links a em{
  font-style:normal;
  font-weight:600;
}

.nav-links a:hover{
  background:rgba(148,163,184,.18);
  color:#f9fafb;
}

/* ------------------------------
   PAGE HEAD
--------------------------------*/
.page-head{
  margin-bottom:26px;
}

.page-head h1{
  font-size:1.9rem;
  font-weight:700;
  margin-bottom:6px;
}

.page-head .lead{
  font-size:.98rem;
  color:var(--text-muted);
}

/* ------------------------------
   SIMULADOR LAYOUT
--------------------------------*/
.sim-layout{
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);
  gap:22px;
  align-items:flex-start;
}

@media(max-width:900px){
  .sim-layout{
    grid-template-columns:1fr;
  }
}

/* ------------------------------
   CARDS
--------------------------------*/
.sim-card,
.results-card{
  background:var(--bg-card);
  border-radius:var(--radius-card);
  border:1px solid var(--border-card);
  box-shadow:var(--shadow-card);
  padding:26px 26px 22px;
}

.results-card{
  position:sticky;
  top:110px;
}

/* ------------------------------
   CAMPOS
--------------------------------*/
.sim-section-title{
  font-size:1.05rem;
  font-weight:600;
  margin-bottom:18px;
  display:flex;
  align-items:center;
  gap:8px;
}

.sim-section-title i{
  color:var(--primary);
}

.sim-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:18px;
  margin-bottom:10px;
}

.field{
  display:flex;
  flex-direction:column;
}

.field label{
  font-size:.86rem;
  font-weight:500;
  color:#374151;
  margin-bottom:4px;
}

.field input,
.field select{
  width:100%;
  padding:10px 11px;
  border-radius:var(--radius-field);
  border:1px solid #d1d5db;
  font-size:.9rem;
  background:#f9fafb;
  transition:border-color .15s,box-shadow .15s,background .15s,transform .05s;
}

.field input:focus,
.field select:focus{
  outline:none;
  border-color:var(--primary);
  background:#ffffff;
  box-shadow:0 0 0 2px rgba(37,99,235,.25);
  transform:translateY(-1px);
}

.help{
  font-size:.75rem;
  color:var(--text-muted);
  margin-top:3px;
  line-height:1.4;
}

.radio-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:4px;
}

.radio-row label{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:.82rem;
  color:#374151;
  font-weight:500;
}

.sim-divider{
  margin:18px 0 14px;
  border-top:1px dashed #e2e8f0;
}

/* ------------------------------
   BOTÕES
--------------------------------*/
.btn-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:18px;
}

button{
  border:none;
  border-radius:999px;
  padding:10px 24px;
  font-size:.9rem;
  font-weight:600;
  cursor:pointer;
  transition:background .15s,box-shadow .15s,transform .05s,color .15s;
}

.btn-primary{
  background:var(--primary);
  color:#f9fafb;
  box-shadow:0 10px 22px rgba(37,99,235,.35);
}

.btn-primary:hover{
  background:#1d4ed8;
  transform:translateY(-1px);
}

.btn-secondary{
  background:#e5e7eb;
  color:#111827;
}

.btn-secondary:hover{
  background:#d1d5db;
}

.btn-excel{
  background:#22c55e;
  color:#f9fafb;
}

.btn-excel:hover{
  background:#16a34a;
}

.btn-pdf{
  background:#dc2626;
  color:#f9fafb;
}

.btn-pdf:hover{
  background:#b91c1c;
}

/* ------------------------------
   RESULTADOS
--------------------------------*/
.results-title{
  font-size:.98rem;
  font-weight:600;
  margin-bottom:10px;
  display:flex;
  align-items:center;
  gap:8px;
}

.results-title i{
  color:#16a34a;
}

.results-body{
  font-size:.9rem;
}

.res-row{
  display:flex;
  justify-content:space-between;
  padding:7px 0;
  border-bottom:1px dashed #e5e7eb;
}

.res-row span:first-child{
  color:#4b5563;
}

.res-row strong{
  font-weight:700;
  color:#111827;
}

.note{
  font-size:.78rem;
  color:var(--text-muted);
  margin-top:8px;
}

.note-iso{
  font-size:.8rem;
  color:#15803d;
  margin-top:8px;
}

.irs-info{
  font-size:.78rem;
  color:#4b5563;
  margin-top:4px;
}

.sep{
  margin:18px 0;
  border:0;
  border-top:1px dashed #e2e8f0;
}

/* ------------------------------
   HISTÓRICO
--------------------------------*/
.hist-table{
  width:100%;
  border-collapse:collapse;
  font-size:.78rem;
  margin-top:8px;
}

.hist-table th{
  text-align:left;
  padding:6px 4px;
  background:#f1f5f9;
  border-bottom:1px solid #e2e8f0;
  font-weight:600;
}

.hist-table td{
  padding:6px 4px;
  border-bottom:1px solid #e2e8f0;
  color:#374151;
}

/* ------------------------------
   ERROS
--------------------------------*/
.error{
  border-color:#dc2626!important;
  background:#fef2f2!important;
}

/* ------------------------------
   FOOTER
--------------------------------*/
.site-footer{
  border-top:1px solid #e5e7eb;
  background:#ffffff;
  margin-top:10px;
}

.footer-row{
  max-width:1120px;
  margin:0 auto;
  padding:14px 20px 18px;
  font-size:.8rem;
  color:#6b7280;
  display:flex;
  justify-content:space-between;
  align-items:center;
}